home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
GRAPHICS
/
TOOLS
/
GVIEW
/
!GView
/
!Help
< prev
next >
Wrap
Text File
|
1997-05-28
|
10KB
|
214 lines
GView 1.00 (27-May-97)
Purpose: GhostScript frontend
Author: Martin Würthner
Runs under: RISC OS 3.1 or higher
Requires: GhostScript 4.03, ChangeFSI, quite a bit of memory
Status: FREEWARE (see below)
GView is a frontend for GhostScript 4.03 (ported by Michael Dennis-Biemans).
GhostScript is available from http://www.stack.nl/~michaeld/gs.html
GView is useless without GhostScript, so if you do not already have a
working GhostScript setup (including fonts), there is no point in trying to
use GView.
GView turns GhostScript into a full Wimp-based PostScript previewer. It extracts
single pages from multi-page PostScript files, processes them using GhostScript
and ChangeFSI and displays the resulting bitmaps.
GView offers the following features:
- handles multiple PostScript files simultaneously
- displays each document in a window
- displays the number of pages the document contains in the title bar
- renders documents in monochrome, 16 colours, 256 colours, 32 thousand
and 16 millon colours (more than 256 colours available only with RISC OS 3.5
or higher)
- runs in any screen mode
It allows you to:
- move to the previous or next page
- jump to any page directly
- save single pages as Sprites
- save all the pages of the whole document as Sprites
- specify the page size and orientation
Although the name may suggest a connection with ghostview which is available
for UNIX machines, the connection between GView and ghostview is only in
similar functionality and GView does not borrow any code from ghostview.
In order to use a PostScript document with GView, it must obey the Adobe
Structured Documents Convention. Most PostScript files which contain multiple
pages do conform to this convention, e.g. those produced by the RISC OS
PostScript printer driver.
Usage
-----
On start-up GView checks whether GhostScript and ChangeFSI have already been
seen by the Filer. If not, GView refuses to start. Display a Filer window
for the directories containing GhostScript and ChangeFSI first or make sure
they are *Filer_Booted by your boot sequence.
In order to view a PostScript file, drag it to the GView icon on the icon bar
(make sure that is has the correct filetype or GView will reject it). GView
will open a window displaying the first page of the document. If not, please
see below "If things go wrong".
The title bar of the window shows the file name and the two numbers [a/b]
where a is the current page number (sequential, not logical) and b is the
total number of pages in the document.
You can go to the next or previous page by pressing Page down (or ⇧DOWN) or
Page up (or ⇧UP) respectively.
The main menu entry 'Goto' allows you to go to any page immediately by entering
the number in the writable field and pressing Return (or clicking on OK). Note
that again, the number you enter is the sequential (i.e. physical) page number
as opposed to the logical page number that might appear on the page.
Other main menu entries are: 'Next page', 'Previous page' (obvious) and 'Save'.
The latter allows you to save the current page only as a Sprite file. If you
want to convert the whole document into a series of Sprites, use 'Document =>
Save' instead (see below). Note that the colour depth of the Sprite is the
one you have chosen in 'Choices...' (from the icon bar menu).
The 'Document' sub-menu leads to a document info box ('Info') and two entries:
'Save' and 'Reprocess'.
Whenever a document is first loaded, the current settings in the 'Choices'
dialogue box are taken and are then bound to the window even if the values are
modified later. The 'Reprocess' menu item forces the current values (as entered
in the 'Choices' box) to be read and to replace the values that were in effect
when the window was first opened. So, if you want to change the colour depth of
a window, simply modify the setting in the 'Choices' box and then choose
'Reprocess'. This causes the current page to be reprocessed with the new
settings. Changing screen mode does not automatically change the colour depth
of open windows (although increasing the colour depth might mean that open
windows are displayed in better quality) unless the colour depth setting was
'Current' when the document was loaded. In this case, the next page which is
processed after a mode change has the new colour depth.
The 'Save' entry in the 'Document' sub-menu is very powerful in that it allows
you to specify a range of (physical) pages to save. Drag the directory icon
to the destination directory and the pages are saved as files 'Page000',
'Page001', 'Page002 etc. into that directory. This feature is similar to the
one in DVIView where I got this idea from. The colour depth of the generated
sprites is that of the window.
Choices
-------
In the 'Choices' dialogue box you can specify the default colour depth, paper
size and page orientation to be used for newly loaded documents. If you do not
know the paper size to be used, you can select 'Unspecified'. This will cause
GhostScript to use whatever its default is (might be 'Legal' which is normally
not a good guess or GhostScript might read the paper size from the document).
The best option is usually to set it to A4. You can change the paper size later
by changing it in the 'Choices' box and choose 'Document => Reprocess' from the
document's main menu.
Note that a 'Custom' paper size sometimes conflicts with the paper size
specified in the PostScript document. This will cause GhostScript to report
a "configurationerror --setpagedevice-- Additional information: [/PageSize
xxx xxx]". If this happens, simply select 'Unspecified' as paper size and
things should work OK.
There are three orientations. 'Portrait' should be obvious. 'Landscape' is the
sort of landscape printing Impression does, i.e. the page is rotated by 90°
anticlockwise. If your document appears the wrong way round with 'Landscape',
try 'Landscape2' which rotates the page in the opposite way. Note that the
'Widht' and 'Depth' parameters in the paper size group always refer to the
dimensions of the portrait page, so they do not change if you select
'Landscape'.
The 'Colour depth' settings determine the number of colours used for the bitmap
GhostScript is asked to generate. This need not be the same as the colour depth
currently used on screen, however by selecting 'Current' you can force this to
happen.
Note that you can speed up the application considerably by choosing a small
colour depth. For most documents (manuals etc.), monochrome should be enough.
This also reduces memory usage.
If things go wrong
------------------
GView has a very rudimentary error handling. Basically, it simply calls
GhostScript and if the requested output file exists after the call has
returned, GView assumes that everything was OK and passes it to ChangeFSI.
After the call to ChangeFSI has returned, GView reads the generated Sprite
file. If either GhostScript or ChangeFSI report an error, then it is likely
that there was something wrong with the PostScript file. Errors reported by
GhostScript are displayed in an error box.
Check whether you have enough space in !Scrap. This is particularly important
if you have chosen 32 thousand or 16 million colours as in this case GView will
ask GhostScript to generate a 24bpp representation of the image which can take
lots of disc space. In addition to the .PCX (or .PPM) generated, there must be
enough space for the Sprite generated by ChangeFSI. To render an A4 page at
16 million colours, you need about 11M of free disc space!
If the PostScript file contains the paper size, then GhostScript will report
an error if you specify a differing 'Custom' paper size. In case of doubt
select 'Unspecified'.
Memory can be a problem, too. The Obey files !GS and !CFSI inside !GView are
used to call GhostScript and ChangeFSI respectively. If either GhostScript or
ChangeFSI complain because of a lack of memory, then try increasing the slots
given to them in these files. Note that they run one after another, so you need
only the maximum of both values as free memory, not the sum. When modifying
the *Wimpslot commands in !GS and !CFSI make sure you do not change anything
else! Take a backup copy of the original files before modifying them.
Please do not contact me if you have problems setting up GhostScript in the
first place. As said above, there is no point in using GView unless GhostScript
works already. If GView fails, try rendering the document using the GhostScript
command line. If that works, then there is a GView problem and I will be happy
to solve it. However, if the command-line driven GhostScript fails as well,
then you have a problem with your GhostScript setup.
Credits
-------
Many thanks to Dominik Symes for Zap, to Paul Fields for DVIView from which I
got several good ideas for this application, to Michael Dennis-Biemans for
porting GhostScript 4.03, to David Alstein for TemplEd, to Acorn Computers
for the DrawFile module which is used by GView.
Acknowledgements
----------------
PostScript is a trademark of Adobe Systems Inc.
UNIX is a trademark of AT&T.
The DrawFile module used by this application is © Acorn Computers Ltd.
Copyright message
-----------------
This application, GView, is © Martin Würthner, 1997 and is FREEWARE.
This means that you may copy it freely provided that
(a) all files of this application are distributed together without
modification
(b) this application is not sold for profit without my explicit written
permission (this includes distribution on CD)
You can contact me at:
Martin Würthner
Jahnstraße 18
71116 Gärtringen
Germany
Phone: +49-7034-928986
Fax: +49-7034-928915
e-mail: wuerthne@trick.informatik.uni-stuttgart.de
If you find this application useful, what about sending me a small bag of
crisps to show your ackowledgement of the work I have put into this
application? I am very fond of British crisps... If it is Christmas time, a
small Christmas pudding would be welcome as well. Or at Easter, a Cadbury's
Caramel Egg. Or a pack of Coconut Cream Crunch biscuits. You see, the
possibilities are almost endless...
If you find this application completely useless, bug-ridden and disgusting,
then it is quite enough to tell me. There is no need to send me any British
sausages... :-)